import React, { Component } from 'react'
import RouteView from '../router/RouterView'
import { RouteList } from '../utils/types'
// import { NavLink } from 'react-router-dom'
import TabBar from '../components/TabBar'

interface Props extends RouteList {

}
interface TabItem{
    path:String,
    name:String
}

type State = {
    tabs:Array<TabItem>
}

export default class Home extends Component<Props, State> {
  state = {
      tabs:[
          {
              path:'/home/index',
              name:'首页'
          },
          {
            path:'/home/classify',
            name:'分类'
        }
      ]
  }

  render() {
    return (
      <div>
          <RouteView routes={this.props.routes}></RouteView>
          <TabBar list={this.state.tabs}></TabBar>
          {/* <div>
          <NavLink to='/home/index'>首页</NavLink>
          <NavLink to='/home/classify'>分类</NavLink>
          </div> */}
      </div>
    )
  }
}